<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('定时任务详细')" />
	<th:block th:include="include :: jsonview-css" />
	<style type="text/css">
	.layui-input-block{padding-top: 10px;}
	.layui-form-item{margin-bottom: 5px;}
	.layui-form-label {
		width: 120px;
		padding: 10px -0px 0px 10px;
	}
	.paramstyle {
		display: block;
		padding: 9.5px;
		margin: 0 0 10px 20px;
		font-size: 13px;
		line-height: 1.42857143;
		color: #333;
		word-break: break-all;
		word-wrap: break-word;
		background-color: #f5f5f5;
		border: 1px solid #ccc;
		border-radius: 4px;
	}
	</style>
</head>
<body>
 <form class="layui-form" id="jobLogForm" th:if="${name == 'jobLog'}" style="padding: 5px 30px 10px 50px;">
	<div class="layui-form-item">
		<label class="layui-form-label">日志序号：</label>
		<div class="layui-input-block" th:text="${jobLog.jobLogId}">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">任务名称：</label>
		<div class="layui-input-block" th:text="${jobLog.jobName}">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">任务分组：</label>
		<div class="layui-input-block" th:text="${jobLog.jobGroup}">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">调用目标字符串：</label>
		<div class="layui-input-block" th:text="${jobLog.invokeTarget}">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">日志信息：</label>
		<div class="layui-input-block" th:text="${jobLog.jobMessage}">
		</div>
	</div>
	<div class="layui-form-item">
	<label class="layui-form-label">执行状态：</label>
		<button type="button" th:class="${jobLog.status == '0' ? 'layui-btn layui-btn-xs' : 'layui-btn layui-btn-xs layui-btn-danger'}"  style="margin-top: 8px;" th:text="${jobLog.status == '0' ? '正常' : '失败'}">
		</button>
	</div>
	<div class="layui-form-item" th:style="'display:' + ${jobLog.status == '0' ? 'none' : 'block'}">
		<label class="layui-form-label">异常信息：</label>
		<div class="layui-input-block"><span class="paramstyle" th:text="${jobLog?.exceptionInfo}"></span>
		</div>
	</div>
 </form>
 <form class="layui-form" id="jobForm" th:if="${name == 'job'}" style="padding: 5px 30px 10px 50px;">
	<div class="layui-form-item">
		<label class="layui-form-label">任务序号：</label>
		<div class="layui-input-block" th:text="${job.jobId}">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">任务名称：</label>
		<div class="layui-input-block" th:text="${job?.jobName}">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">调用目标字符串：</label>
		<div class="layui-input-block" th:text="${job?.invokeTarget}">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">cron表达式：</label>
		<div class="layui-input-block" th:text="${job?.cronExpression}">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">下次执行时间：</label>
		<div class="layui-input-block" th:text="${#dates.format(job.nextValidTime, 'yyyy-MM-dd HH:mm:ss')}">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">执行策略：</label>
		<div class="layui-input-block" th:if="${job.misfirePolicy == '1'}">立即执行</div>
		<div class="layui-input-block" th:if="${job.misfirePolicy == '2'}">执行一次</div>
		<div class="layui-input-block" th:if="${job.misfirePolicy == '3'}">放弃执行</div>
	</div>
	<div class="layui-form-item">
	<label class="layui-form-label">并发执行：</label>
		<button type="button" th:class="${job.concurrent == '0' ? 'layui-btn layui-btn-xs' : 'layui-btn layui-btn-xs layui-btn-danger'}" style="margin-top: 8px;" th:text="${job.concurrent == '0' ? '允许' : '禁止'}">
		</button>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">执行状态：</label>
		<button type="button" th:class="${job.status == '0' ? 'layui-btn layui-btn-xs' : 'layui-btn layui-btn-xs layui-btn-danger'}" style="margin-top: 8px;" th:text="${job.status == '0' ? '正常' : '暂停'}">
		</button>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">备注：</label>
		<div class="layui-input-block"><span class="paramstyle" th:text="${job?.remark}"></span>
		</div>
	</div>
 </form>
</body>
</html>